package com.tgz.controller;

//import com.tgz.config.MyVar;

import com.tgz.config.MyVar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author hsj
 * @description:
 * @date 2022/12/22 16:30
 */
@Controller
public class PageController {
    @Autowired
    private MyVar myVar;


    @RequestMapping(value = "/broadcast.html",method = RequestMethod.GET)
    public String bScreen(Model model) {
        model.addAttribute("endpoint", myVar.getEndpoint());
        model.addAttribute("topic", myVar.getTopic());
        model.addAttribute("title", "广播");
        return "broadcast";
    }



    /**
     * @Description:user单聊：一对一
     * @author HeShengjin 2356899074@qq.com
     * @date 2022/12/26 10:02
     */
    @RequestMapping(value = "/one-to-one-chat.html",method = RequestMethod.GET)
    public String oneToOneChat(Model model) {
        model.addAttribute("endpointUser", myVar.getEndpointUser());
        model.addAttribute("topicUser", myVar.getTopicUser());
        model.addAttribute("topicUserChannel", myVar.getTopicUserChannel());
        model.addAttribute("title", "一对一");
        return "one-to-one-chat";
    }
}
